home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / SPL.ARJ / STMTS < prev    next >
Text File  |  1991-09-26  |  8KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.              The  following are the statement formats for the  SuperBASIC 
  10.              Programming Language.
  11.  
  12.          1.  BEGIN
  13.  
  14.          2.  REAL <variable> {,<variable>,..........,<variable>};
  15.  
  16.          3.  INTEGER <variable> {,<variable>,..........,<variable>};
  17.  
  18.          4.  STRING <variable> {,<variable>,..........,<variable>};
  19.  
  20.          5.  REAL ARRAY <array variable>(<bounds>) {,<array variable>  
  21.  
  22.              (<bounds>),..........};    
  23.  
  24.          6.  INTEGER ARRAY <array variable>(<bounds>) {,<array variable>
  25.  
  26.              (<bounds>),..........};
  27.  
  28.          7.  STRING ARRAY <array variable>(<bounds>) {,<array variable>
  29.  
  30.              (<bounds>),..........};
  31.  
  32.          8.  PROCEDURE <procedure name> { (<parameter list>) };
  33.  
  34.              BEGIN
  35.  
  36.               <statements>
  37.  
  38.              END
  39.  
  40.          9.  COMMENT <text>; [Note: <text> should not contain ' char.]
  41.  
  42.         10.  GO <label>;
  43.  
  44.         11.  GO TO <label>;
  45.  
  46.         12.  GOTO <label>;
  47.  
  48.         13.  ONERRGOTO <label>;
  49.  
  50.         14.  RETURN {<label>};
  51.  
  52.         15.  INPUT( {@} {<prompt string>{@|,}} <variable list> );
  53.  
  54.         15a. INPUT( #<file number>,<variable list> );
  55.  
  56.         15b. LINEIN( {@} {<prompt string>{@|,}} <string variable>);
  57.  
  58.         15c. LINEIN( #<file number>,<string variable>);
  59.  
  60.         16.  GET #<file number> {,<record number>};
  61.  
  62.         17.  PUT #<file number> {,<record number>};
  63.  
  64.  
  65.  
  66.                                         9
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.         18.  OUTPUT( {#<file number>,} {USING <string expression>@}
  76.  
  77.              {<output expression list>} );
  78.  
  79.         19.  {CALL} <procedure name> {( <argument list> )};
  80.  
  81.         20.  FOR <scalar arithmetic variable> := <start arith. expr.>
  82.  
  83.                   STEP <increment arithmetic expression>
  84.  
  85.                        UNTIL <limit arithmetic expression>
  86.  
  87.                             DO BEGIN
  88.  
  89.                                  <statements>
  90.  
  91.                             END
  92.  
  93.         21.  IF <logical expression> THEN  <statement>
  94.  
  95.              { ELSE <statement> }
  96.  
  97.              Note: In each of the clauses THEN,ELSE the <statement>
  98.  
  99.              can be replaced with BEGIN <statements> END
  100.  
  101.              The  single  statement may not be an IF,FOR,REPEAT,REAL,
  102.  
  103.              INTEGER,STRING,PROCEDURE,ON, or WHILE statement. You
  104.  
  105.              must place it between BEGIN and END statements.
  106.  
  107.         22.  END
  108.  
  109.         23.  WHILE <logical expression> DO
  110.  
  111.              BEGIN
  112.  
  113.               <statements>
  114.  
  115.              END
  116.  
  117.         24.  REPEAT <statements>
  118.  
  119.              UNTIL <logical expression>;
  120.  
  121.         25.  ;
  122.  
  123.         26.  WRITE {#<file number>,} {<expression list>};
  124.  
  125.         27.  CHAIN( <file name> );
  126.  
  127.         28.  BEEP;
  128.  
  129.         29.  BLOAD( <file name> {,<offset>} );
  130.  
  131.  
  132.                                        10
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.         30.  BSAVE( <file name>,<offset>,<length> );
  142.  
  143.              Note:The  offset  is  added to the current  segment  address
  144.  
  145.              which gives the address.
  146.  
  147.         31.  CALL <variable> {( <argument list> )};
  148.  
  149.              Note:<variable>  is  an INTEGER variable that has  the  same
  150.  
  151.              name as a global program name as in PASCAL,ASSEMBLER, or
  152.  
  153.              FORTRAN (by MICROSOFT)
  154.  
  155.         32.  CLEAR {{,<highest location>} {,<stack space>}};
  156.  
  157.         33.  CLOSE( {#} <file number> {,{#} <file number>,..........} );
  158.  
  159.         34.  FILES( { <files> } );
  160.  
  161.         35.  FIELD # <file number>,<field width> AS <string variable>,
  162.  
  163.              { <field width> AS <string variable>,.......... };
  164.  
  165.         36.  KILL( <files> );
  166.  
  167.         37.  NAME( <file name> AS <new file name> );
  168.  
  169.         38.  OPEN( <mode>,{#} <file number>,<file name> {,<record len.>} );
  170.  
  171.              Note:The <mode> in 38. is 'O','I',or 'R'
  172.  
  173.         38a. OPEN( <file name> { FOR <mode> } AS {#} <file number> 
  174.  
  175.              { LEN = <record length> } );
  176.  
  177.              Note:The <mode> in 38a. is INPUT,OUTPUT,or APPEND. RANDOM
  178.  
  179.              is assumed if mode is left out.
  180.  
  181.         38b. OPEN( 'COM1:<speed>,<parity>,<data>,<stop>' AS <file no.> );
  182.  
  183.         39.  OUT( <port number>,<data> );
  184.  
  185.         40.  DOS;
  186.  
  187.              Note:This statement brings the user back to MS DOS.
  188.  
  189.         41.  POKE <machine location offset>,<data>;
  190.  
  191.         42.  RESET;
  192.  
  193.         43.  RESUME { <label> };
  194.  
  195.         44.  RUN( <file name> );
  196.  
  197.  
  198.                                        11
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.         45.  STOP;
  208.  
  209.         46.  WAIT <port address>,<integer expr.>,<integer expr.>;
  210.  
  211.         47.  HOME;   Note:This statement clears the screen.
  212.  
  213.         48.  DEFSEG := <expression>;
  214.  
  215.         49.  ERROR <integer expression>;
  216.  
  217.         50.  KEY <key number>,<string expression>;
  218.  
  219.         50a. KEY LIST;
  220.  
  221.         50b. KEY ON;
  222.  
  223.         50c. KEY OFF;
  224.  
  225.         51.  LSET <string variable> := <string expression>;
  226.  
  227.         52.  RSET <string variable> := <string expression>;
  228.  
  229.         53.  RANDOMIZE <arithmetic expression>;
  230.  
  231.         54.  SWAP <variable>,<variable>;
  232.  
  233.         55.  COLOR { <foreground> } {,<background> };
  234.  
  235.         56.  DRAW <string expression>;
  236.  
  237.         57.  CIRCLE (<x center>,<y center>),<radius> {,<color {,<start>
  238.  
  239.              ,<end> {,<aspect ratio>}}};
  240.  
  241.         58.  GET (<x1>,<y1>)-(<x2>,<y2>),<array name>;
  242.  
  243.         59.  PUT (<x1>,<y1>),<array name> {,<action verb> };
  244.  
  245.              Note: <action verb> is AND,OR,XOR,PSET,or PRESET
  246.  
  247.         60.  LINE (<x1>,<y1>)-(<x2>,<y2>) {,{<color>} {,B {F}};
  248.  
  249.              Note:Lower case letters b,f can be used instead of B,F
  250.  
  251.         61.  LOCATE {<row>},{<column>} {,{<cursor>}};
  252.  
  253.         62.  PRESET (<x>,<y>) {,<color>};
  254.  
  255.         62a. PRESET STEP (<x offset>,<y offset>) {,<color>};
  256.  
  257.         63.  PSET (<x>,<y>) {,<color>};
  258.  
  259.         63a. PSET STEP (<x offset>,<y offset>) {,<color>};
  260.  
  261.         64.  PAINT (<x start>,<y start>) {,<paint color> {,<border color>}};
  262.  
  263.  
  264.                                        12
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.         65.  SCREEN {<graphics mode>,} {<reverse video>};
  274.  
  275.         66.  DATE$ := <date string expression>;
  276.  
  277.         67.  TIME$ := <time string expression>;
  278.  
  279.         68.  MID$(<string expr. 1>,<integer expr. 1>{,<integer expr. 2>})
  280.  
  281.                   := <string expression 2>;
  282.  
  283.         69.  WIDTH <integer expression>;
  284.  
  285.         70.  COM( <arithmetic expression> )  ON
  286.                                              OFF   ;
  287.                                              STOP
  288.  
  289.         71.  KEY( <arithmetic expression> )  ON
  290.                                              OFF   ;
  291.                                              STOP
  292.  
  293.         72.  ON COM( <arithmetic expression> ) THEN CALL <procedure name> ;
  294.  
  295.         73.  ON KEY( <arithmetic expression> ) THEN CALL <procedure name> ;
  296.  
  297.         Note:  For statements 72. and 73. the <procedure name> represents 
  298.  
  299.         a procedure without arguments.
  300.  
  301.         74.  NULL <integer expression>;
  302.  
  303.         75. <space> EOT <space>
  304.  
  305.              Note:This must be on the last line of the file.
  306.  
  307.         76.  <arithmetic variable> := <arithmetic expression>;
  308.  
  309.         77.  <string variable> := <string expression>;
  310.  
  311.         78.  <label>:.....:<label>:<executable statement>;
  312.  
  313.         Anything in between { } is optional.
  314.  
  315.         Anything  between  < > means a description of the value and  that 
  316.  
  317.         the < > are not part of the statement.
  318.  
  319.         Repetition symbol ......... means that an item can be repeated.
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.